#ifndef CLIB_TCP_IN_H
#define CLIB_TCP_IN_H

#pragma once

#ifdef __cplusplus
extern "C" {
#endif

#include "clib_type.h"
#include "clib_queue.h"
#include "clib_stack.h"

#pragma once

#define CLIB_TCP_CMP_SEQ(a, b)   ((i32_t) ((a) - (b)))

i32_t
clib_process_ipv4_tcp_packet(stack_ctx_t *ctx,ip4_hdr_t* ipv4,i32_t ip_len,u64_t cur_ts);

i32_t
clib_process_ipv6_tcp_packet(stack_ctx_t *ctx,ip6_hdr_t* ipv4,i32_t ip_len,u64_t cur_ts);

i32_t
clib_parse_tcp_opts(tcp_stream_t *stream,u08_t *opts,int len,u64_t cur_ts);

#ifdef __cplusplus
}
#endif

#endif